package com.example.androidmqtt.Entry;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: pjg
 * @time: 2022/9/14
 */

public class News implements Serializable {

    @TableId(value = "news_id",type = IdType.AUTO)
    private Integer newsId;

    @TableField("news_title")
    private String newsTitle;

    @TableField("news_content")
    private String newsContent;

    @TableField("news_author")
    private Integer newsAuthor;

    @TableField("news_department")
    private Integer newsDepartment;

    @TableField("news_appendix")
    private String newsAppendix;

    @TableField("publish_time")
    private Date newsPublish;

    @TableField("iscancel")
    private Integer isCancel;

    public News() {
    }

    public News(String newsTitle, String newsContent, Integer newsAuthor, Integer newsDepartment,String newsAppendix) {
        this.newsTitle = newsTitle;
        this.newsContent = newsContent;
        this.newsAuthor = newsAuthor;
        this.newsDepartment = newsDepartment;
        this.newsAppendix = newsAppendix;
    }

    public String getNewsAppendix() {
        return newsAppendix;
    }

    public void setNewsAppendix(String newsAppendix) {
        this.newsAppendix = newsAppendix;
    }

    public Integer getNewsId() {
        return newsId;
    }

    public void setNewsId(Integer newsId) {
        this.newsId = newsId;
    }

    public String getNewsTitle() {
        return newsTitle;
    }

    public void setNewsTitle(String newsTitle) {
        this.newsTitle = newsTitle;
    }

    public String getNewsContent() {
        return newsContent;
    }

    public void setNewsContent(String newsContent) {
        this.newsContent = newsContent;
    }

    public Integer getNewsAuthor() {
        return newsAuthor;
    }

    public void setNewsAuthor(Integer newsAuthor) {
        this.newsAuthor = newsAuthor;
    }

    public Integer getNewsDepartment() {
        return newsDepartment;
    }

    public void setNewsDepartment(Integer newsDepartment) {
        this.newsDepartment = newsDepartment;
    }

    public Date getNewsPublish() {
        return newsPublish;
    }

    public void setNewsPublish(Date newsPublish) {
        this.newsPublish = newsPublish;
    }

    public Integer getIsCancel() {
        return isCancel;
    }

    public void setIsCancel(Integer isCancel) {
        this.isCancel = isCancel;
    }

    @Override
    public String toString() {
        return "News{" +
                "newsId=" + newsId +
                ", newsTitle='" + newsTitle + '\'' +
                ", newsContent='" + newsContent + '\'' +
                ", newsAuthor=" + newsAuthor +
                ", newsDepartment=" + newsDepartment +
                ", newsAppendix='" + newsAppendix + '\'' +
                ", newsPublish=" + newsPublish +
                ", isCancel=" + isCancel +
                '}';
    }
}
